package com.open.capacity.points.service;

import com.open.capacity.common.exception.service.ServiceException;
import com.open.capacity.common.model.SysUser;
import com.open.capacity.common.web.Result;
import com.open.capacity.points.dto.DateQuery;

public interface PointsService {
    /**
     * 查询用户当前积分
     * @param user userId | username
     * @return points
     */
    Integer findCurrentPoints(SysUser user);

    Integer findObtainPointsByDate(Long userId, DateQuery dateQuery);

    Integer findConsumePointsByDate(Long userId, DateQuery dateQuery);

    Result change(Long userId, String pointsRuleCode, int points) throws ServiceException;

    Result findObtainPoints(Long userId) throws ServiceException;

    Result findTodayObtainPoints(Long userId) throws ServiceException;

    Result findConsumePoints(Long userId) throws ServiceException;

    Result findTodayConsume(Long userId) throws ServiceException;
}
